package com.juyu.miliao.api.dao.mysql;

import com.juyu.miliao.api.domain.CommentReplyInfo;
import com.juyu.miliao.api.domain.WhitePacketCommentReplyInfo;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author xuanqicheng
 * @create 2019-21-15:39
 */
@Repository
public class WhitePacketCommentReplyInfoDao {
    @Autowired
    private SqlSession sqlSession;

    public void addCommentReply(WhitePacketCommentReplyInfo commentReplyInfo) {
        sqlSession.insert("addWhitePacketCommentReply",commentReplyInfo);
    }

    public List<WhitePacketCommentReplyInfo> getCommentReplyInfoByCommentId(Long commentId) {
        return sqlSession.selectList("getWhitePacketCommentReplyInfoByCommentId",commentId);
    }
}
